import React from 'react'

import { Table } from 'antd';

const columns = [
  {
    title: '结算单据号',
    key: 'invoiceNo',
    dataIndex: 'invoiceNo',
  },
  {
    title: '姓名',
    key: 'name',
    dataIndex: 'name',
  },
  {
    title: '机构名称',
    key: 'medOrgName',
    dataIndex: 'medOrgName',
  }
];

class Test extends React.Component{
  paginationParam = {
    total: 100,
    showSizeChanger: true,
    showQuickJumper: true,
    showTotal: total => `总共 ${total} 条记录`,
    onShowSizeChange:(current, size) => { // pageSize 变化的回调
      // this.paginationParam.current = 2
    },
    onChange: (page, pageSize) => { // 页码改变的回调
    }
  }
  testClick = function(){
    this.paginationParam.current = 2
  }
  render(){
    console.log('uiuu')
    return (
      <div>
        <Table columns={columns} pagination={this.paginationParam} bordered/>
        <button onClick={this.testClick.bind(this)}>事件触发</button>
      </div>
    )
  }
}

export default Test;